import { lazy } from 'react'

const Main = lazy(() => import('../container/main'))
const About = lazy(() => import('../container/about'))
const Comment = lazy(() => import('../container/comment'))
const Detail = lazy(() => import('../container/detail'))
const NoMatch = lazy(() => import('../container/NoMatch'))

const routers = [
  {
    path: '/',
    component: Main,
    exact: true,
  },
  {
    path: '/comment',
    exact: false,
    component: Comment,
    title: '留言',
  },
  {
    path: '/about',
    exact: false,
    component: About,
    title: '关于我',
  },
  {
    path: '/detail/:id',
    exact: false,
    component: Detail,
    title: '文章详情',
  },
  {
    path: '',
    exact: false,
    component: NoMatch,
    title: 'Not Found',
  },
]

export default routers
